package com.neegix.development.menu.application.assembler;

import com.neegix.development.menu.application.dto.MenuDTO;
import com.neegix.development.menu.interfaces.vo.MenuVO;
import com.neegix.development.menu.domain.entity.MenuEntity;
import com.neegix.development.menu.interfaces.form.NewMenuForm;
import com.neegix.development.menu.interfaces.form.QueryMenuForm;
import com.neegix.development.menu.interfaces.form.UpdateMenuForm;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import java.util.List;

 /**
  * This file is auto-generated by nebula-framework-generator.
  * The auto-generation plugin was developed using IntelliJ IDEA Community Edition.
  * Thanks to JetBrains for their outstanding contributions to the developer community.
  * <p>
  * The code generated by this tool is owned by the user of the tool.
  * The tool itself is copyrighted by <a href="https://www.neegix.com">https://www.neegix.com</a>.
  *
  * @author <a href="https://www.neegix.com">https://www.neegix.com</a>
  * @version 1.0.0
  * @since 2024-11-21 16:19:51
  */

@Mapper
public interface MenuAssembler {
    MenuAssembler INSTANCE = Mappers.getMapper(MenuAssembler.class);

    @Mapping(target = "id", ignore = true)
    @Mapping(target = "createTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "createUser", ignore = true)
    @Mapping(target = "updateUser", ignore = true)
    MenuEntity covertEntity(NewMenuForm newMenuForm);

    @Mapping(target = "createTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "createUser", ignore = true)
    @Mapping(target = "updateUser", ignore = true)
    MenuEntity covertEntity(UpdateMenuForm updateMenuForm);

    @Mapping(target = "createTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    MenuDTO covertDTO(QueryMenuForm queryMenuForm);

    List<MenuVO> covertVO(List<MenuDTO> MenuDTOs);

    MenuVO covertVO(MenuDTO queryMenuDTO);
}